//
//  loginView.m
//  jinling
//
//  Created by mac on 2018/9/30.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "loginView.h"
#import "loginTableViewCell.h"
@implementation loginView

-(void)creatView{
    _tableView=[BaseTableView new];
    [self addSubview:_tableView];
    [_tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.mas_equalTo(0);
        make.top.mas_equalTo(NAV_HEIGHT);
    }];
    _tableView.delegate=self;
    _tableView.dataSource=self;
    
    UIView *headView2=[UIView new];
    [headView2 setFrame:CGRectMake(0, 0,_mainW ,_mainW/2)];

    _tableView.tableHeaderView=headView2;
    
    UIImageView *imageView=[UIImageView new];
    [headView2 addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.mas_equalTo(0);
    }];
    imageView.image=[UIImage imageNamed:@"登陆"];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    
    // Return the number of sections.
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    
    
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    loginTableViewCell *cell=[[loginTableViewCell alloc] init];
    cell.viewController=self.viewController;
    cell.url=_url;
    [cell cratView];
    tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 300;
}
@end
